package com.ht.medicaltreatment.activity

import androidx.lifecycle.ViewModelProvider
import com.blankj.utilcode.util.LogUtils
import com.gym.baselib.base.BaseActivity
import com.ht.medicaltreatment.R
import com.ht.medicaltreatment.viewmodel.SampleShowListViewModel

/**
 * 通过Excel创建样本之后，在这个页面回显数据
 */
class SampleShowBuildListActivity:BaseActivity() {
    override fun getLayoutId() = R.layout.activity_sample_show_list_layout

    private lateinit var model:SampleShowListViewModel
    private var page = 1

    override fun init() {
        model = ViewModelProvider(this)[SampleShowListViewModel::class.java]
        val list  = intent.getIntegerArrayListExtra("sampleIdList")
        list?.forEach {
            LogUtils.i(it)
        }
        if (list != null) {
            showProgress()
            model.request(page,list,{
                dismissProgress()

            })
        }
    }
}